package com.fei.service;

import com.fei.bean.CommentBean;
import com.fei.bean.PageBean;
import com.fei.mapper.CommentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentServiceImpl implements CommentService{

    @Autowired
    CommentMapper commentMapper;

    @Override
    public Integer selectOneIdCountService(int video_id) {
        return commentMapper.selectOneIdCount(video_id);
    }

    @Override
    public List<CommentBean> selectOneVideoIdPageService(PageBean pageBean) {
        return commentMapper.selectOneVideoIdPage(pageBean);
    }

//    @Override
//    public List<CommentBean> selectOneVideoIdService(int video_id) {
//        return commentMapper.selectOneVideoId(video_id);
//    }

    @Override
    public int insertVideoCommentService(CommentBean commentBean) {
        return commentMapper.insertVideoComment(commentBean);
    }

}
